package truedano.truedano;

import android.app.Activity;
import android.content.Context;
import android.util.Log;
import android.view.Gravity;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.Toast;

public class MyUtil extends Activity {

	void ToastShow(Context c, String s){
		Toast.makeText(c, s, Toast.LENGTH_SHORT).show();
	}
	
	void ToastShowPos(Context c, String s, int g, int x, int y){
		Toast t = Toast.makeText(c, s, Toast.LENGTH_SHORT);
		t.setGravity(g, x, y);
		t.show();
	}
	
	void ToastShowPic(Context c, String s,int r){
		Toast t = Toast.makeText(c, s, Toast.LENGTH_SHORT);
		ImageView image = new ImageView(c);
		image.setImageResource(r);
		LinearLayout tView = (LinearLayout) t.getView();
		tView.addView(image,0);
		t.show();
	}
}
